#!/bin/bash

FULL_PATH_TO_SCRIPT="$(realpath "${BASH_SOURCE[-1]}")"
SCRIPT_DIRECTORY="$(dirname "$FULL_PATH_TO_SCRIPT")"
SCRIPT_FILENAME="$(basename "$FULL_PATH_TO_SCRIPT")"
hostfile="$SCRIPT_DIRECTORY/hostfile"

command="mpirun --allow-run-as-root --hostfile $hostfile ${@:1}"
printf -- '-%.0s' {1..100}; echo ""
echo $command
printf -- '-%.0s' {1..100}; echo ""
eval $command
